import java.util.ArrayList;
import java.util.List;

public class test {
    public static List<Character> func(String str1, String str2) {
        List<Character> List = new ArrayList<>();
        int j = 0;
        for (int i = 0; i < str1.length(); i++) {
            char ch  = str1.charAt(i);
            if (!str2.contains(ch+"")) //contains(这里要是字符串)
                List.add(ch);
        }
        return List;
    }

    public static void main(String[] args) {
        List<Character> ret = func("welcome to cvte","come");//向上转型
        for (char ch:ret) {
            System.out.print(ch);//打印不能直接打印List，否则为：[w, l,  , t,  , v, t]
        }
    }
}
